import request from '@/utils/request'

// 查询定位器信息列表
export function listbatteryLocateInfo(query) {
    return request({
        url: '/business/batteryLocateInfo/list',
        method: 'get',
        params: query
    })
}

// 查询定位器信息详细
export function getbatteryLocateInfo(id) {
    return request({
        url: '/business/batteryLocateInfo/' + id,
        method: 'get'
    })
}

// 新增定位器信息
export function addbatteryLocateInfo(data) {
    return request({
        url: '/business/batteryLocateInfo',
        method: 'post',
        data: data
    })
}

// 修改定位器信息
export function updatebatteryLocateInfo(data) {
    return request({
        url: '/business/batteryLocateInfo',
        method: 'put',
        data: data
    })
}

// 删除定位器信息
export function delbatteryLocateInfo(id) {
    return request({
        url: '/business/batteryLocateInfo/' + id,
        method: 'delete'
    })
}

// 导出定位器信息
export function exportbatteryLocateInfo(query) {
    return request({
        url: '/business/batteryLocateInfo/export',
        method: 'get',
        params: query
    })
}

// 最后位置

export function lastLocate(batteryNo) {
    return request({
        url: `/business/batteryLocateInfo/lastLocate/${batteryNo}`,
        method: 'get'
    })
}


export function lastMsg(deviceNo) {
    return request({
        url: `/business/batteryLocateInfo/lastMsg/${deviceNo}`,
        method: 'get'
    })
}

